<template>
  <div>
    <div>账号切换</div>
    <button @click="wjl()" type="default" size="mini">王经理</button>
    <button @click="lrsjl()" type="default" size="mini">李人事经理</button>
    <button @click="zzjl()" type="default" size="mini">张总经理</button>
    <button @click="lisi()" type="default" size="mini">李四</button>
    <button @click="admin()" type="default" size="mini">admin</button>
    <div>当前token：{{ token }}</div>
  </div>
</template>

<script>
export default {
  name: "Test",

  data() {
    return {
      token: ''
    };
  },

  created(){
    this.token = window.localStorage.getItem('token')
  },

  methods: {
    wjl() {
      window.localStorage.setItem('token', '');
      let token = 'eyJhbGciOiJIUzUxMiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAAAKtWKi5NUrJScgwN8dANDXYNUtJRSq0oULIyNDczMDcyMTEw1lEqLU4t8kxRsjKCMPMSc1OBWsqzcpRqAU2sfphAAAAA.xj-uebco1wX6wSVR2qBTiJNBoDw7Q9dswXUA72-hFfJ1jpzaAtBYAostAkgI8c0YiM-ko6657Cq9eJNYCFtMRw'
      window.localStorage.setItem('token', token);
      this.token = window.localStorage.getItem('token')
    },

    lrsjl() {
      window.localStorage.setItem('token', '');
      let token = 'eyJhbGciOiJIUzUxMiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAAAKtWKi5NUrJScgwN8dANDXYNUtJRSq0oULIyNDczMDcyMTEz0FEqLU4t8kxRsjKGMPMSc1OBWnKKirNylGoBpAcqmUIAAAA.jM9NpFVhwxe3p5hMeEJySqWyJhIHua8lrQeT1i4jFJHvF3uHAgUBFFQNyGttSqPEXNK-bUy-OBzQOmdjrSbFKA'
      window.localStorage.setItem('token', token);
      this.token = window.localStorage.getItem('token')
    },

    zzjl() {
      window.localStorage.setItem('token', '');
      let token = 'eyJhbGciOiJIUzUxMiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAAAKtWKi5NUrJScgwN8dANDXYNUtJRSq0oULIyNDczMDcyMTU01VEqLU4t8kxRsoIy8xJzU4FaqqqycpRqAXDaTUpBAAAA.Zyt3Z3pQw3rn_BL0k2iVRBhijMPHZ4JNrirGjka5Hypv05Gx9f0aHzIF57wB6_ay7ccAA-6LLu6AWxHXck_9qw'
      window.localStorage.setItem('token', token);
      this.token = window.localStorage.getItem('token')
    },

    lisi() {
      window.localStorage.setItem('token', '');
      let token = 'eyJhbGciOiJIUzUxMiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAAAKtWKi5NUrJScgwN8dANDXYNUtJRSq0oULIyNDczMDc3MTc30lEqLU4t8kxRsjKBMPMSc1OBWnIyizOVagGY3ya9QQAAAA.MGycPZlXkQtBCl-Zb5pLbDV6Iq_4MeaFq7kXS5t3-KHEnb_ZpIqhLWJ8nItkJJi0sxL7QNNvqk86XlfQEt5qrA'
      window.localStorage.setItem('token', token);
      this.token = window.localStorage.getItem('token')
    },

    admin() {
      window.localStorage.setItem('token', '');
      let token = 'eyJhbGciOiJIUzUxMiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAAAKtWKi5NUrJScgwN8dANDXYNUtJRSq0oULIyNDczMDc3MTOw1FEqLU4t8kwBikGYeYm5qUAtiSm5mXlKtQBGqZJHQgAAAA.lm0rSdpVv_-WgdxXeJfcwLlZKCTxISmDlt7qnvAkDQAtmqZTr7FLm6NbLj87ox2fsumLkViY-TOwsgkqUcpG_g'
      window.localStorage.setItem('token', token);
      this.token = window.localStorage.getItem('token')
    }
  }
}
</script>
